\documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage[UTF8]{ctex}
\usepackage{graphicx}
\usepackage{float}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage[linesnumbered,boxed,lined,ruled]{algorithm2e}
\usepackage{algorithmicx}
\usepackage{algpseudocode}

\usepackage{xcolor}
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
\usepackage{listings}

\usepackage{sectsty} % Allows customizing section commands
\allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps

\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{\thepage} % Page numbering for right footer
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{
\normalfont \normalsize
\textsc{中国科学院大学   计算机与控制学院} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge 随机过程第六次作业 \\ % The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{黎吉国&201618013229046} % Your name
\date{\normalsize Sep 25,2016}

\begin{document}

\maketitle % Print the title

\newpage
\textbf{本次作业主题：}最近复习了随机过程的一些基础知识，例如单个随机变量的概念，以及随机变量的函数等，本次作业主要是理解随机变量函数的性质。
\section{两个随机变量的函数}
假设$X,Y$是两个随机变量，他们的概率密度是$f_{XY}(x,y)$，$Z=X/Y$，求$Z$的概率密度。\\
我们先求$Z$的分布函数：
\[
\begin{split}
F_Z(\mathbf{z})=P(z<\mathbf{z}) & =\int_0^{\infty}\int_{-\infty}^{yz}f_{XY}(x,y)dxdy+\int_{-\infty}^{0}\int_{yz}^{\infty}f_{XY}(x,y)dxdy\\
f_Z(\mathbf{z})=\frac{dF_Z}{d\mathnf{z}}&=\int_0^\infty yf_{XY}(zy,y)dy-\int_{-\infty}^0 yf_{XY}(zy,y)dy\\
&=\int_{-\infty}^{+\infty}|y|f_{XY}(zy,y)dy
\end{split}
\]
\begin{figure}[H]
\centering
\includegraphics[width=3in,height=3in]{zxy.jpg}
\caption{x/y<z的区域}
\label{fig:graph}
\end{figure}
\textbf{练习}\\
随机变量$x,y$是独立的，其密度分别为$\alpha e^{-\alpha x}U(x)$和$\beta e^{-\beta y}U(y)$.试求
$z=x/y$的概率密度。\\
\textbf{解：}\\
由前面的推导可得:
\[
\begin{split}
  f_{XY}(x,y)&=f_X(x)f_Y(y)=\alpja \beta e^{-\alpha x-\beta y}U(x)U(y)\\
  when\ z>0\\
  f_Z(\mathbf{z})&=\int_{-\infty}^{+\infty}|y|f_{XY}(zy,y)dy\\
  &=\int_0^{+\infty}y\alpha \beta e^{-y(\alpha z+\beta)}dy\quad \text{(分部积分)}\\
  &=\frac{\alpha \beta}{\alpha z+\beta}[ \int_0^{+\infty}e^{-y(\alpha z+\beta)}dy-ye^{-y(\alpha z+\beta)|_0^{+\infty}} ]\\
  &=\frac{\alpha \beta}{(\alpha z+\beta)^2}\\
  f_Z(\mathbf{z})&=\frac{\alpha \beta}{(\alpha z+\beta)^2}U(z)
\end{split}
\]

\newpage
\section{两个随机变量的函数}
$z=x^2+y^2$，则
\[ F_z(\mathbf{z})=\int\int_{x^2+y^2\le z}f_{XY}(x,y)dxdy  \quad z\ge0 \]
若$x,y \sim N(0,\sigma^2)$且相互独立,求$z$的概率密度分布。
\[
\begin{split}
  f_{XY}(x,y)&=\frac{1}{2\pi \sigma^2}e^{-\frac{x^2+y^2}{2\sigma^2}}\\
  when\ z>0&\\
  F_z(z)&=\int\int_{x^2+y^2\le z}\frac{1}{2\pi \sigma^2}e^{-\frac{x^2+y^2}{2\sigma^2}}dxdy\\
  let\ x&=r\cos\theta,y=r\sin\theta,then\ J=|\frac{\partial(x,y)}{\partial(r,\theta)}|=r \\
  F_z(z)&=\int_0^{+\infty}\frac{-\pi}{\pi}\frac{1}{2\pi\sigma^2}e^{-\frac{r^2}{2\sigma^2}}rdrd\theta\\
  &=\frac{1}{\theta^2}\int_0^{\sqrt{2}}re^{-\frac{r^2}{2\theta^2}}dr\\
  \frac{dF_Z}{dz}&=\frac{dF_Z}{d\sqrt{z}}+\frac{d\sqrt{z}}{dz}\\
  &=\frac{1}{\theta^2}e^{-\frac{z}{2\theta^2}}*(\frac{1}{2\sqrt{2}})\\
  &=\frac{1}{2\theta^2}e^{-\frac{z}{2\theta^2}}\\
  F_Z(z)&=\frac{1}{2\theta^2}e^{-\frac{z}{2\theta^2}}U(z)
\end{split}
\]

\newpage
\section{两个随机变量的函数}
已知$x,y$的联合分布为$f_XY(x,y)$，求$z=xy$的分布。\\
这里使用前面求积分的方法不好求。所以这里我们使用换元的方法。
\[x=g_1(u,v),y=g_2(u,v),then\ f(x,y)\to f(g_1(u,v),g_2(u,v))|\frac{\partial(x,y)}{\partial(u,v)}|\]
\[
\begin{split}
  let\ z&=xy,w=x,then\ x=w,y=z/w,|\frac{\partial(x,y)}{\partial(u,v)}|=|w| \\
  f_{zw}(z,w)&=\frac{1}{|w|}f_{xy}(w,\frac{z}{w})\\
  f_z(z)&=\int_{-\infty}^{+\infty}\frac{1}{|w|}f_{xy}(w,\frac{z}{w})dw
\end{split}
\]

\section{收获}\\
随机变量的概念，随机变量的函数的分布等是整个随机过程的基础，理解这一部分对于理解复杂的随机过程以及其性质有很重要的作用。
\end{document}
